Page({
    data:{
        title:"念",
        time:"2023-7-17",
        singer:"薛之谦",
        url:"http://p1.music.126.net/QxtlFDWCaKICD00pGIlzNg==/109951168739117009.jpg?param=177y177",
        list:[
            {
                id:2064033095,
                videoSrc:"http://music.163.com/song/media/outer/url?id=2064033095.mp3",
                songname:"念",
                name:"薛之谦",
            }
        ]
    },
    tomusic(event) {
        const item = event.currentTarget.dataset.item; // 获取当前点击的数据项
        console.log(item);
        const { id, videoSrc,songname,name } = item; // 从数据项中解构出
        const { list,url }=this.data
        console.log(list);
        wx.navigateTo({
            url: `/pages/music/music?id=${id}&videoSrc=${encodeURIComponent(videoSrc)}&songname=${songname}&name=${name}&url=${encodeURIComponent(url)}&list=${encodeURIComponent(JSON.stringify(list))}`, 
        })
    }
})